package org.pettyfox.pfpay.biz;

import lombok.extern.slf4j.Slf4j;
import org.pettyfox.pfpay.entity.PayAlone;
import org.pettyfox.pfpay.mapper.PayAloneMapper;
import org.springframework.data.redis.core.SetOperations;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

@Slf4j
@Service
public class PayAloneBiz extends BaseBiz<PayAloneMapper,PayAlone>{


    SetOperations setOperations ;

    public PayAlone get(Integer id){
        return mapper.selectByPrimaryKey(id);
    }
    public List<PayAlone> listAllByEnable(){
        Example example = new Example(PayAlone.class);
        example.createCriteria().andEqualTo("enable",PayAlone.Enable.ENABLE.value());
        return mapper.selectByExample(example);
    }

}
